//
//  WBN_FM_MainCollectionViewCell.m
//  GoodManNews
//
//  Created by 王博男 on 16/1/11.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "WBN_FM_MainCollectionViewCell.h"
#import "Masonry.h"

@interface WBN_FM_MainCollectionViewCell ()

@property (nonatomic, retain) UIImageView *playImageV;

@end

@implementation WBN_FM_MainCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createView];
    }
    return self;
}

- (void)layoutSubviews
{
//    [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
//       
//        make.top.equalTo(self.contentView);
//        make.left.equalTo(self.contentView);
//        make.width.equalTo(self.contentView);
//        make.height.equalTo(self.contentView.mas_width);
//        
//    }];
//    
//    
//    [self.playImageV mas_makeConstraints:^(MASConstraintMaker *make) {
//       
//        make.center.mas_equalTo(self.imageV);
//        make.size.mas_equalTo(CGSizeMake(30, 30));
//        
//    }];
//    
//    
//    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
//       
//        make.top.equalTo(self.imageV.mas_bottom);
//        make.bottom.equalTo(self.nameL.mas_top);
//        make.width.equalTo(self.contentView);
//        
//    }];
//    
//    
//    [self.nameL mas_makeConstraints:^(MASConstraintMaker *make) {
//       
//        make.top.equalTo(self.contentView.mas_bottom).offset(-20);
//        make.bottom.equalTo(self.contentView);
//        make.width.equalTo(self.contentView);
//        
//    }];
}

- (void)createView
{
    self.imageV = [UIImageView new];
    self.imageV.layer.cornerRadius = 7;
    self.imageV.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.imageV];
    
    
    self.playImageV = [UIImageView new];
    self.playImageV.image = [UIImage imageNamed:@"list_FM_playIcon@3x"];
    [self.contentView addSubview:self.playImageV];
    
    
    self.titleL = [UILabel new];
    self.titleL.textColor = [UIColor colorWithRed:0.124 green:0.011 blue:0.487 alpha:1.000];
    self.titleL.text = @"哈哈哈哈红红火火哈哈哈哈红红火火哈哈";
    self.titleL.numberOfLines = 0;
    self.titleL.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:self.titleL];
    
    
    self.nameL = [UILabel new];
    self.nameL.textColor = [UIColor lightGrayColor];
    self.nameL.text = @"哈哈哈哈红红火火";
    self.nameL.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:self.nameL];
}

@end
